home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / FixMath.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  1.2 KB  |  72 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Thursday, September 7, 1989 at 8:55 PM
  4.     FixMath.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1985-1991
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __FIXMATH__
  15. #define __FIXMATH__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. pascal Fract Fix2Frac(Fixed x)
  25.     = 0xA841;
  26. pascal long Fix2Long(Fixed x)
  27.     = 0xA840;
  28. pascal Fixed FixATan2(long x,long y)
  29.     = 0xA818;
  30. pascal Fixed Long2Fix(long x)
  31.     = 0xA83F;
  32. pascal Fixed Frac2Fix(Fract x)
  33.     = 0xA842;
  34.     
  35. #ifdef mc68881
  36.  
  37. pascal extended Frac2X(Fract x);
  38. pascal extended Fix2X(Fixed x); 
  39. pascal Fixed X2Fix(extended x); 
  40. pascal Fract X2Frac(extended x);
  41.  
  42. #else
  43.  
  44. pascal extended Frac2X(Fract x)
  45.     = 0xA845;
  46. pascal extended Fix2X(Fixed x)
  47.     = 0xA843; 
  48. pascal Fixed X2Fix(extended x)
  49.     = 0xA844; 
  50. pascal Fract X2Frac(extended x)
  51.     = 0xA846;
  52.  
  53. #endif
  54.  
  55. pascal Fract FracMul(Fract x,Fract y)
  56.     = 0xA84A;
  57. pascal Fixed FixDiv(Fixed x,Fixed y)
  58.     = 0xA84D;
  59. pascal Fract FracDiv(Fract x,Fract y)
  60.     = 0xA84B;
  61. pascal Fract FracSqrt(Fract x)
  62.     = 0xA849;
  63. pascal Fract FracSin(Fixed x)
  64.     = 0xA848;
  65. pascal Fract FracCos(Fixed x)
  66.     = 0xA847;
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70.  
  71. #endif
  72.